import * as ModelProto from '@/proto/model/ModelProto'
import ListenerInterface from '@/listener/ListenerInterface'
import websocketClient from '@/api/WebSocketClient'

class AuthListener implements ListenerInterface {
  constructor() {}
  apply = (response: ModelProto.Response) => {
    if (response.resp?.code == 200) {
      //认证成功,修改认证标志
      websocketClient.setIsAuthorized(true)
    }
  }
}

export default AuthListener
